/**
 * 
 */
package com.zhiteng.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * <p>
 * Title: Procins.java
 * </p>
 * <p>
 * Description: 流程实例实体
 * </p>
 * 
 * @author dragon
 * @date 2018年12月3日
 * @version 1.0
 */
@Table(name = "tb_procins")
public class Procins implements Serializable {
	@Id
	private Long id;
	private Long bill_id; // 请假单/调休单id
	private Integer type; // 流程类型：1.请假 2.调休
	private String school_id; // 学校的id
	private String teacher_id; // 申请人id
	private String petitioner_id;// 被请求老师的id:请假单/调休单用
	private Integer status; // 状态：0：同意 1：不同意 默认为null
	private String assignee_id; // 审批人的id
	private Date start; // 流程发起时间
	private Date end; // 流程结束时间
	private Integer complated; // 流程是否已经结束（数据库中有默认值0）：0-审批中 1-审批通过 2-审批驳回
	private String remark; // 批注
	private Integer sequence; // 是第几个审批人

	public Integer getSequence() {
		return sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}

	public String getTeacher_id() {
		return teacher_id;
	}

	public void setTeacher_id(String teacher_id) {
		this.teacher_id = teacher_id;
	}

	public String getSchool_id() {
		return school_id;
	}

	public void setSchool_id(String school_id) {
		this.school_id = school_id;
	}

	public String getPetitioner_id() {
		return petitioner_id;
	}

	public void setPetitioner_id(String petitioner_id) {
		this.petitioner_id = petitioner_id;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getBill_id() {
		return bill_id;
	}

	public void setBill_id(Long bill_id) {
		this.bill_id = bill_id;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getAssignee_id() {
		return assignee_id;
	}

	public void setAssignee_id(String assignee_id) {
		this.assignee_id = assignee_id;
	}

	public Date getStart() {
		return start;
	}

	public void setStart(Date start) {
		this.start = start;
	}

	public Date getEnd() {
		return end;
	}

	public void setEnd(Date end) {
		this.end = end;
	}

	public Integer getComplated() {
		return complated;
	}

	public void setComplated(Integer complated) {
		this.complated = complated;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public String toString() {
		return "Procins [id=" + id + ", bill_id=" + bill_id + ", type=" + type + ", school_id=" + school_id
				+ ", teacher_id=" + teacher_id + ", petitioner_id=" + petitioner_id + ", status=" + status
				+ ", assignee_id=" + assignee_id + ", start=" + start + ", end=" + end + ", complated=" + complated
				+ ", remark=" + remark + ", sequence=" + sequence + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((assignee_id == null) ? 0 : assignee_id.hashCode());
		result = prime * result + ((bill_id == null) ? 0 : bill_id.hashCode());
		result = prime * result + ((complated == null) ? 0 : complated.hashCode());
		result = prime * result + ((end == null) ? 0 : end.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((petitioner_id == null) ? 0 : petitioner_id.hashCode());
		result = prime * result + ((remark == null) ? 0 : remark.hashCode());
		result = prime * result + ((school_id == null) ? 0 : school_id.hashCode());
		result = prime * result + ((sequence == null) ? 0 : sequence.hashCode());
		result = prime * result + ((start == null) ? 0 : start.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result + ((teacher_id == null) ? 0 : teacher_id.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Procins other = (Procins) obj;
		if (assignee_id == null) {
			if (other.assignee_id != null)
				return false;
		} else if (!assignee_id.equals(other.assignee_id))
			return false;
		if (bill_id == null) {
			if (other.bill_id != null)
				return false;
		} else if (!bill_id.equals(other.bill_id))
			return false;
		if (complated == null) {
			if (other.complated != null)
				return false;
		} else if (!complated.equals(other.complated))
			return false;
		if (end == null) {
			if (other.end != null)
				return false;
		} else if (!end.equals(other.end))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (petitioner_id == null) {
			if (other.petitioner_id != null)
				return false;
		} else if (!petitioner_id.equals(other.petitioner_id))
			return false;
		if (remark == null) {
			if (other.remark != null)
				return false;
		} else if (!remark.equals(other.remark))
			return false;
		if (school_id == null) {
			if (other.school_id != null)
				return false;
		} else if (!school_id.equals(other.school_id))
			return false;
		if (sequence == null) {
			if (other.sequence != null)
				return false;
		} else if (!sequence.equals(other.sequence))
			return false;
		if (start == null) {
			if (other.start != null)
				return false;
		} else if (!start.equals(other.start))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		if (teacher_id == null) {
			if (other.teacher_id != null)
				return false;
		} else if (!teacher_id.equals(other.teacher_id))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

}
